removed unecessary null check