Yup, a check would have prevented the errors and some kind of notification to the user that arguments were not being passed would have saved allot of time on this issue.