Add array check in ischecked and isselected snippets