Fix error in static platforms

On Android, you can't check if an int is null