nil check and type safety