Nil check in controller