Allow passing string to constructor only