* Why do you only do this check in one function?
* Why is this error checking not in a method of its own?