Completed the required functions for caching matrix inverse values