added check for nil leave requests