added check for is_array in Route annotation to silence foreach warnings