added array_type_check helper