Yes, it is legal. One can do a handwritten codicil to a typed and witnessed will. However, doing a holographic codicil may be prone to mistakes as chances are high one will make a mistake in doing it correctly. A handwritten codicil may also make the probate process more difficult; thus, it is wise to do a typed one or hire an experienced estate planning attorney to do it instead.