Guarding against null element for controller