implemented metric validation prior to storing