document.Queryselector Null Check

var selection = document.querySelector('.selector') !== null;
Borma