added null checks/tests