Finished Error Checking Function
Fanny rebase plx?
...