click event for add new location button
click event for add new location button
null check for json arrays