Throw internal exception in valueByName if elementByName is undef