Corrected the way to check instance of Array