Adding checks for properties and logging the error.