Removing bugs with null objects