Quantum-mechanical shell effects are expected to strongly enhance nuclear binding on an island of stability of superheavy elements. The predicted center at proton number $Z=114,120$, or $126$ and neutron number $N=184$ has been substantiated by the recent synthesis of new elements up to $Z=118$. However the location of the center and the extension of the island of stability remain vague. High-precision mass spectrometry allows the direct measurement of nuclear binding energies and thus the determination of the strength of shell effects. Here, we present such measurements for nobelium and lawrencium isotopes, which also pin down the deformed shell gap at $N=152$.