Handled potential NullPointerException in GhcModi.