Allow for optional Boolean coercion in `definePattern`