Add a safety check for OF hooks