fixes #17 - isValid should not throw exception if connection is not valid