Please review the merge request. Added case for array check.