check empty string before parsing numbers