add check_version utility

using LooseVersion and explicitly catching TypeError, rather than the NumericalVersion subclass.