Removed some redundant not-null checks