[Ian, Shane, Pei] fixing error with null input validation