Still trying to find the time to write this up! In the meantime every function either returns the expected value or null. To wrap these just make sure you catch errors by checking for null. You can look at the source in the saladbar or saladbar-task packages for examples.