Added an extra check on arrays