First working version of cacheSolve works well but need matrix already defined, not working with null, will fix that