<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def createEmails(nicks=None, nicksFile=None):
 """ Method that globally permits to generate the emails to be checked. Args: ----- nicks: List of aliases. nicksFile: The filepath to the aliases file. Returns: -------- list: list of emails to be checked. """

    candidate_emails = set()
    if nicks != None:
        for n in nicks:
            for e in email_providers.domains:
                candidate_emails.add("{}@{}".format(n, e))
    elif nicksFile != None:
        with open(nicksFile, "r") as iF:
            nicks = iF.read().splitlines()
            for n in nicks:
                for e in email_providers.domains:
                    candidate_emails.add("{}@{}".format(n, e))
    return candidate_emails