Adding empty? check to the controller