Merge "Consolidate handler thread check functions in HandlerUtils" into main