Added a check to verify controller has no Null Pointer Exceptions