Remove unnecessary null pointer checks. Fix #491.