Removing null pointer on controller value