In case of an error, core.get_user_data returns an empty list. None is never returned. Hence, only pop data from the returned list, if it is non-empty.