function isRelevantElement(elem) {
    // Allow comments and whitespaces.
    var itIs = elem.isComment || elem.isWhitespace;

    // Variable declaration itself.
    itIs = itIs || elem.type === 'VariableDeclaration';

    // For '{' in `function() { var a; }`.
    itIs = itIs || elem.type === 'Punctuator';

    // Skip 'use strict' statements at the beginning.
    itIs = itIs || elem.type === 'Directive';

    return itIs;
}
Checks for allowed elements before variable declaration.

@param {Object} elem
@returns {Boolean}