replace fromJust with safeFromJust
rejecting terminating expressions that are transormed to local, with a more informative message