@classmethod
def getBytes(cls, value):
    """
        Convert string to byte array.
        value: String value.
        returns String as bytes.
        """
    if not value:
        return None
    return value.encode()
