Fixed javascript error when php variable  was not set.