add return value validation check for arraylike