Metrics-Extension: Fixed AttributeError: 'NoneType' object has no

attribute 'strip'

This is similar to commit 34525e927ffb31795b45145dcddf29fa20675d96. In
new versions path can be None, so I added an if block to check if that
is the case, and return if so.