Update resetTargetDimensions to fix error

This function can get called when dimensions are null, resulting in an error. See https://github.com/dart-lang/paper-elements/issues/58 for the original report . The repro contained in that issue basically just opens two paper-toasts a few milliseconds apart.