Removing null check that is redundant