BaseTools: fix None comparisons