Added argument checking.