refactoring on metric format rules
NPE fix