Updated hardenProperty with error handlers.