use check as recommended in Mozilla docs