Cleaned up the if statements

Not sure how you feel about this, but instead of using multiple if statements, just passing the options object into a function with the required fields to check if they are undefined. If they are then throw the error. I also cleaned up the errors to be a bit more description.

Using a ‘mixin’ to check for undefined. This also works for objects within objects. Since it is only throwing one error, made it a bit more DRY to just check if the passed in argument object values are undefined or not.