Fixed an issue returning and avatar for nil user in tests