Change default value to null instead of throwing an exception and added few more unit tests