It's possibly important to keep `object != null` as in MDN snippet here.