I'm not convinced this is the correct check - it seems to be what is used elsewhere in this module.