We should use a single method (and respectively - a single regexp) for both checks. It will be more compact and a bit faster.