Check invalid characters