HDFS-5224: clean up check for EmptyPathError