added try catches to create object and query to check if handle is in database.