Typically, you’ll check for null using the triple equality operator ( === or !== ) , also known as the strict equality operator, to be sure that the value in question is definitely not null: object !== null . That code checks that the variable object does not have the value null .