Removed somewhat unnecessary null check