Add check_array_region into math_interface.