Check error is available before access it.