#JavaScript (ES6), <s>22</s> <s>19</s> <s>23</s> 22 bytes <!-- language: lang-js --> a=>!/[^2,]|22/.test(a) --- ##Test it <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> f= a=>!/[^2,]|22/.test(a) console.log(" "+f([2])+": "+JSON.stringify([2])) console.log(" "+f([2,2])+": "+JSON.stringify([2,2])) console.log(" "+f([[2],[2,2],2])+": "+JSON.stringify([[2],[2,2],2])) console.log(" "+f([])+": "+JSON.stringify([])) console.log(" "+f([[],[]])+": "+JSON.stringify([[],[]])) console.log(f([1])+": "+JSON.stringify([1])) console.log(f([22])+": "+JSON.stringify([22])) console.log(f([2,2,2,1])+": "+JSON.stringify([2,2,2,1])) console.log(f([[1,2],2])+": "+JSON.stringify([[1,2],2])) <!-- end snippet -->