more checks for null input handling