Remove superfluous variable $first

Initialize variable properyl, and use empty() to check for empty string