Changed .Count() to try catch