Help with GUI

Hi everybody, I'm new to GUI and was wondering if someone could help me with my fraction calculator if they input text in the fields or if they leave something blank. I'm not quite sure how to do that. Here's my code, and if someone could guide me to how to do it, I'd be very thankful.

basically you need to check if they have a value. if the enter nothing then the string will be null or "". If you try to set a integer equal to null, you will get an exception, so you need to check the value of the fraction inputs before you turn them into integers.
do so this simly use an if statement