Add some null guards
Make assertion methods public static