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

Closes #476