Removed an unnecessary null check