Adds "Element::isValid" method for checking element presence in DOM

Related to #476