Removed duplicate null check