Adding some checks and auto initialize data fields
Adding some checks and auto initialize data fields