add json spec helper
reorganize spec helpers
check if avatar is null