Did you mean that it returns None rather than false? It looks like that's what the code is doing (which makes more sense than having a variable potentially hold either a string or a boolean).