MSSQL: return false on invalid result