Verify return value of jit_value_get_function

Signed-off-by: Niklas Koep <niklas.koep@gmail.com>