Check for slash at the end of string