Convert cost table lookup functions to return a pointer to the entry or nullptr inste...