ensure/ensure_has_substring: validating argument type