Added more unit tests re null checks