Modified cacheMean function for cacheSolve