Help with a custom function

Help with a custom function

This all starts with function code provided to me via Zoho. I'm using it to have a task automatically created based on information entered in another module (internal notes). I have 2 issues with the code. 

1. On the 8th line -- mp.put("Who_Id",ifnull(taskDetails.get("Person").get("id"),"")); 
This code words great if I select a "Person", however the field is optional and if it isn't populated then my function errors out. 

2.  The reminder Time is off by an hour. I was told to change -07:00 in my code to -05:00, when I set the reminder for 7/30/2019 12:00pm with -5:00 instead of it being 2 hours earlier, it is 2 hours earlier on the previous day 7/29/2019 10:00am  

If anyone can point me in the right direction or help I would appreciate that. I assume some kind of if statement would work for the 1st issue (i'm not quite there yet in my knowledge to write it) and the 2nd issue is super confusing to me, I don't understand. The -5 logic seems sound but it doesn't work for me.

mp = Map();
taskDetails = zoho.crm.getRecordById("Coaching_Calls",thisid);
info taskDetails;
mp.put("Owner",ifnull(taskDetails.get("Create_Task_For").get("id"),""));
mp.put("Subject",ifnull(taskDetails.get("Task_Subject"),""));
mp.put("Due_Date",ifnull(taskDetails.get("Task_Due_Date1"),""));
mp.put("Description",ifnull(taskDetails.get("Task_Description"),""));
mp.put("Who_Id",ifnull(taskDetails.get("Person").get("id"),""));
reminderTime = taskDetails.get("Reminder");
mp.put("Remind_At",{"ALARM":"FREQ=NONE;ACTION=EMAIL;TRIGGER=DATE-TIME:" + reminderTime.toString("yyyy-MM-dd'T'HH:mm:ss'-07:00'")});
mp.put("$se_module","Accounts");
mp.put("What_Id",ifnull(taskDetails.get("Company_Name").get("id"),""));
create = zoho.crm.createRecord("Tasks",mp);
info create;