More invalid character checking