added ability to detect empty stringswq