Added a simple argument checking to support directly form object