Probably should use islandora_paged_content_can_derive($object, 'OCR')) here.

Also before calling:
islandora_ocr_get_enabled_tesseract_languages
We should call module_enabled('islandora_ocr').