some null checks