Added some operators and some error checking

Specifically added error checking for null matrices