Fix #140: Remove unnecessary null pointer checks