More functional parser that can be used instead of `contains`, without exception side-effect.