compare querySelctor to null, not undefined