Fixed NullPointerException when encountering array types