text method returns innerHTML on undefined val