Introduce a function that determines whether a given string is a valid object id (40 chars of hexadigits).