MT#9403 Use proper check for empty folder