check whitelistFlag exists before parsing