Document.queryselector Null проверка
var selection = document.querySelector('.selector') !== null;
Borma
var selection = document.querySelector('.selector') !== null;