See also previous discussion at Suggestion for more general/performant sentinel for find* functions - #4 by ScottPJones.