Checks an address is not the same character repeated or an empty sequence

def check_address(self, address):
        """Checks an address is not the same character repeated or an empty sequence"""
        if address is None:
            self.raise_error(InvalidAddress, details='address is None')
        if all(letter == address[0] for letter in address) or len(address) < self.minFundingAddressLength or ' ' in address:
            self.raise_error(InvalidAddress, details='address is invalid or has less than ' + str(self.minFundingAddressLength) + ' characters: "' + str(address) + '"')
        return address