Php Assign Variable If Not Null Javascript