Removed try catch block and replaced with a null check for property class