marvel API request if else logic correction