check for array first. its fastest than object