as_KMR function

Convert in a KMR object when possible