add null checks for all of these methods