Added type checking for CacheMatrix in cacheSolve
Tidied whitespace and comments.