Python: doing an action depending of the type of object
You are trying to assign 'EMPTY' to "bpy.context.object.type" within an if clause.
For checking the value of something, you need to use "==", not "=".

if bpy.context.object.type == 'EMPTY':
    bpy.context.object.location[0] = 8.46184