Added sanity checking for method parameters

Added scenario to JUnit test : attempting to call setParentData with a null or empty list