Added '#' test case into checkIfValid, test-p-ok passes now