Adding method isEmpty() to Dom