Avoid allocating HashMaps when lexical vars are null.