add second condition branch

add if statement to suppress error in compile for missing sdk