make sanity null checks more explicit