Added if statements in case there is no calendar or event